﻿<UserControl x:Class="Silverlight_Simple_Test_App.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="768" d:DesignWidth="480">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="Auth Simple in Silverlight" />
            <TextBlock x:Name="PageTitle" Text="sample file" Margin="9,-7,0,0" />
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width=".15*" />
                <ColumnDefinition Width=".5*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="25" />
                <RowDefinition Height="25" />
                <RowDefinition Height="50" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <TextBlock Text="Email:" Grid.RowSpan="1" VerticalAlignment="Center" HorizontalAlignment="Right" FontSize="25" />
            <TextBox Text="" x:Name="EmailBox" Grid.Column="1" VerticalAlignment="Stretch" />

            <TextBlock Text="Password:" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" FontSize="25" />
            <PasswordBox x:Name="PasswordBox" Grid.Column="1" Grid.Row="1" VerticalAlignment="Stretch" />

            <Button x:Name="goButton" Grid.Row="2" Content="Go" VerticalAlignment="Center" HorizontalAlignment="Stretch" Click="goButton_Click" Grid.ColumnSpan="2" Margin="0,0" />
            <ListBox x:Name="result" Grid.Row="3" Grid.RowSpan="1" Grid.ColumnSpan="2" />

            <ListBox x:Name="fileList" Grid.Row="4" Visibility="Visible" Height="150" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.ColumnSpan="2">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=path}"/>
                            <TextBlock Text="{Binding Path=bytes}"/>
                            <TextBlock Text="{Binding Path=modified}"/>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </Grid>

</UserControl>